VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MsComCtl.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{B3FB64BF-91F9-11D7-A482-0008A14158BC}#2.22#0"; "ITGControls.ocx"
Begin VB.Form frmFATransfer 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   7500
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   10605
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   7500
   ScaleWidth      =   10605
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.StatusBar sbRS 
      Align           =   2  'Align Bottom
      Height          =   285
      Left            =   0
      TabIndex        =   0
      Top             =   7215
      Width           =   10605
      _ExtentX        =   18706
      _ExtentY        =   503
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   1
            Bevel           =   0
            Object.Width           =   5479
            MinWidth        =   2
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   3528
            MinWidth        =   3528
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin ITGControls.ITGTab SSTab1 
      Height          =   1275
      Left            =   0
      TabIndex        =   5
      Top             =   0
      Width           =   10485
      _ExtentX        =   18494
      _ExtentY        =   2249
      TabCount        =   2
      TabCaption(0)   =   "               Main               "
      TabContCtrlCnt(0)=   5
      Tab(0)ContCtrlCap(1)=   "txtRemarks"
      Tab(0)ContCtrlCap(2)=   "dtbDate"
      Tab(0)ContCtrlCap(3)=   "txtTranNo"
      Tab(0)ContCtrlCap(4)=   "Timer1"
      Tab(0)ContCtrlCap(5)=   "Label5"
      TabCaption(1)   =   "               List               "
      TabContCtrlCnt(1)=   1
      Tab(1)ContCtrlCap(1)=   "dtgList"
      TabTheme        =   2
      ActiveTabBackStartColor=   16250865
      ActiveTabBackEndColor=   16243138
      InActiveTabBackStartColor=   16243138
      InActiveTabBackEndColor=   16243138
      InActiveTabForeColor=   -2147483639
      BeginProperty ActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty InActiveTabFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      OuterBorderColor=   4210752
      TopLeftInnerBorderColor=   4210752
      BottomRightInnerBorderColor=   4210752
      DisabledTabBackColor=   16243138
      DisabledTabForeColor=   -2147483627
      Begin MSDataGridLib.DataGrid dtgList 
         Height          =   960
         Left            =   -75000
         TabIndex        =   4
         Top             =   315
         Width           =   10485
         _ExtentX        =   18494
         _ExtentY        =   1693
         _Version        =   393216
         AllowArrows     =   -1  'True
         HeadLines       =   1
         RowHeight       =   15
         TabAction       =   2
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   3
         BeginProperty Column00 
            DataField       =   "cTranNo"
            Caption         =   "Transaction Number"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   "dDate"
            Caption         =   "Date"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   1
               Format          =   "MM/dd/yyyy"
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   3
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "cRemarks"
            Caption         =   "Remarks"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   1033
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
               Locked          =   -1  'True
               ColumnWidth     =   1574.929
            EndProperty
            BeginProperty Column01 
               Locked          =   -1  'True
            EndProperty
            BeginProperty Column02 
               Locked          =   -1  'True
               ColumnWidth     =   6300.284
            EndProperty
         EndProperty
      End
      Begin ITGControls.ITGTextBox txtRemarks 
         Height          =   285
         Left            =   135
         TabIndex        =   3
         Top             =   810
         Width           =   9420
         _ExtentX        =   16404
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Remarks"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   8060
         Required        =   -1  'True
      End
      Begin ITGControls.ITGDateBox dtbDate 
         Height          =   285
         Left            =   8115
         TabIndex        =   2
         Top             =   465
         Width           =   1425
         _ExtentX        =   2514
         _ExtentY        =   503
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Text            =   ""
         SendKeysTab     =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtTranNo 
         Height          =   285
         Left            =   135
         TabIndex        =   1
         Top             =   495
         Width           =   2700
         _ExtentX        =   4551
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Mandatory       =   -1  'True
         Label           =   "Transaction ID"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1340
         Required        =   -1  'True
      End
      Begin VB.Timer Timer1 
         Interval        =   300
         Left            =   3210
         Top             =   345
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "Date"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         Left            =   7425
         TabIndex        =   6
         Top             =   510
         Width           =   720
      End
   End
   Begin ITGControls.ComunionFrames ComunionFrames3 
      Height          =   3315
      Left            =   5220
      Top             =   2820
      Width           =   5265
      _ExtentX        =   9287
      _ExtentY        =   5847
      FrameColor      =   4210752
      BackColor       =   16243138
      FillColor       =   16243138
      RoundedCorner   =   0   'False
      Caption         =   "New Value"
      Alignment       =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ThemeColor      =   5
      ColorFrom       =   16243138
      ColorTo         =   16250865
      Begin VB.CommandButton Command6 
         Height          =   300
         Left            =   2595
         Picture         =   "frmFATransfer.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   2490
         Width           =   345
      End
      Begin VB.CommandButton Command4 
         Height          =   300
         Left            =   2595
         Picture         =   "frmFATransfer.frx":014A
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   1860
         Width           =   345
      End
      Begin VB.CommandButton Command3 
         Height          =   300
         Left            =   2595
         Picture         =   "frmFATransfer.frx":0294
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   1230
         Width           =   345
      End
      Begin VB.CommandButton Command2 
         Height          =   300
         Left            =   2595
         Picture         =   "frmFATransfer.frx":03DE
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   600
         Width           =   345
      End
      Begin ITGControls.ITGTextBox ITGTextBox3 
         Height          =   285
         Left            =   1440
         TabIndex        =   11
         Top             =   1545
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox4 
         Height          =   285
         Left            =   135
         TabIndex        =   12
         Top             =   1230
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Department"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox ITGTextBox5 
         Height          =   285
         Left            =   1440
         TabIndex        =   13
         Top             =   2175
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox6 
         Height          =   285
         Left            =   135
         TabIndex        =   14
         Top             =   1860
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Account"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox ITGTextBox7 
         Height          =   285
         Left            =   135
         TabIndex        =   15
         Top             =   600
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Accountable"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox ITGTextBox8 
         Height          =   285
         Left            =   1440
         TabIndex        =   16
         Top             =   915
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox11 
         Height          =   285
         Left            =   1440
         TabIndex        =   17
         Top             =   2805
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox12 
         Height          =   285
         Left            =   135
         TabIndex        =   18
         Top             =   2490
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Expense"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
   End
   Begin ITGControls.ComunionFrames ComunionFrames2 
      Height          =   3315
      Left            =   0
      Top             =   2820
      Width           =   5235
      _ExtentX        =   9234
      _ExtentY        =   5847
      FrameColor      =   4210752
      BackColor       =   16243138
      FillColor       =   16243138
      RoundedCorner   =   0   'False
      Caption         =   "Old Value"
      Alignment       =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ThemeColor      =   5
      ColorFrom       =   16243138
      ColorTo         =   16250865
      Begin VB.CommandButton Command5 
         Height          =   300
         Left            =   2640
         Picture         =   "frmFATransfer.frx":0528
         Style           =   1  'Graphical
         TabIndex        =   22
         Top             =   2490
         Width           =   345
      End
      Begin VB.CommandButton cmdPickDepAcct 
         Height          =   300
         Left            =   2640
         Picture         =   "frmFATransfer.frx":0672
         Style           =   1  'Graphical
         TabIndex        =   21
         Top             =   1860
         Width           =   345
      End
      Begin VB.CommandButton cmdPickAcct 
         Height          =   300
         Left            =   2640
         Picture         =   "frmFATransfer.frx":07BC
         Style           =   1  'Graphical
         TabIndex        =   20
         Top             =   1230
         Width           =   345
      End
      Begin VB.CommandButton Command1 
         Height          =   300
         Left            =   2640
         Picture         =   "frmFATransfer.frx":0906
         Style           =   1  'Graphical
         TabIndex        =   19
         Top             =   585
         Width           =   345
      End
      Begin ITGControls.ITGTextBox txtAcctDesc 
         Height          =   285
         Left            =   1485
         TabIndex        =   23
         Top             =   1545
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtAcctNo 
         Height          =   285
         Left            =   180
         TabIndex        =   24
         Top             =   1230
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Department"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtDepAcctDesc 
         Height          =   285
         Left            =   1485
         TabIndex        =   25
         Top             =   2175
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtDepAcctNo 
         Height          =   285
         Left            =   180
         TabIndex        =   26
         Top             =   1860
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Account"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox ITGTextBox1 
         Height          =   285
         Left            =   180
         TabIndex        =   27
         Top             =   600
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Accountable"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox ITGTextBox2 
         Height          =   285
         Left            =   1485
         TabIndex        =   28
         Top             =   915
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox9 
         Height          =   285
         Left            =   1485
         TabIndex        =   29
         Top             =   2805
         Width           =   3525
         _ExtentX        =   6112
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3465
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox ITGTextBox10 
         Height          =   285
         Left            =   180
         TabIndex        =   30
         Top             =   2490
         Width           =   2430
         _ExtentX        =   4075
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   "Expense"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1070
         Required        =   -1  'True
      End
   End
   Begin ITGControls.ComunionFrames ComunionFrames1 
      Height          =   1575
      Left            =   0
      Top             =   1260
      Width           =   10485
      _ExtentX        =   18494
      _ExtentY        =   2778
      FrameColor      =   4210752
      BackColor       =   16243138
      FillColor       =   16243138
      RoundedCorner   =   0   'False
      Caption         =   "Fixed Assets Description"
      Alignment       =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ThemeColor      =   5
      ColorFrom       =   16243138
      ColorTo         =   16250865
      Begin VB.CommandButton cmdPickEmpCode 
         Height          =   300
         Left            =   2985
         Picture         =   "frmFATransfer.frx":0A50
         Style           =   1  'Graphical
         TabIndex        =   31
         Top             =   525
         Width           =   345
      End
      Begin ITGControls.ITGTextBox txtEmpCode 
         Height          =   285
         Left            =   150
         TabIndex        =   32
         Top             =   525
         Width           =   2790
         _ExtentX        =   4710
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Mandatory       =   -1  'True
         Label           =   "Fixed Asset"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   1430
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtEmpName 
         Height          =   285
         Left            =   3345
         TabIndex        =   33
         Top             =   525
         Width           =   3555
         _ExtentX        =   6165
         _ExtentY        =   503
         BackColor       =   14737632
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         AllCaps         =   -1  'True
         Label           =   ""
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   0
         TextBoxWidth    =   3495
         Enabled         =   0   'False
      End
      Begin ITGControls.ITGTextBox txtDescription 
         Height          =   285
         Left            =   150
         TabIndex        =   34
         Top             =   840
         Width           =   6750
         _ExtentX        =   11695
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Description"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   5390
         Required        =   -1  'True
      End
      Begin ITGControls.ITGTextBox txtCategory 
         Height          =   285
         Left            =   150
         TabIndex        =   35
         Top             =   1155
         Width           =   6750
         _ExtentX        =   11695
         _ExtentY        =   503
         SendKeysTab     =   -1  'True
         BackColor       =   14745599
         LabelBackColor  =   16243138
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mandatory       =   -1  'True
         Label           =   "Category"
         BeginProperty LabelFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         LabelWidth      =   1300
         TextBoxWidth    =   5390
         Required        =   -1  'True
      End
   End
End
Attribute VB_Name = "frmFATransfer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables




Private oPrint As New clsPrinting

'Recordset variables
Private WithEvents rsHeader As ADODB.Recordset
Attribute rsHeader.VB_VarHelpID = -1
Private rsIN As ADODB.Recordset
Private rsOUT As ADODB.Recordset

'ADO Connection variables

Private connHeader As ADODB.Connection
Private connIN As ADODB.Connection
Private connOUT As ADODB.Connection

'Form mode enumeration
Enum eAssTransMode
    Normal
    AddNewEdit
    Find
End Enum
Public Mode As eAssTransMode

'Other declarations
Public dtgName As String
Public sBit As String
Private vBM As Variant 'Recordset bookmark variable

Private lSystemGenerated As Boolean
Public strNo As String

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

'Private Sub cboTransfer_Click()
'    If dtgName = dtgTransferIN.Name Then
'        rsIN!cWH = cboTransfer
'    ElseIf dtgName = dtgTransferOUT.Name Then
'        rsOUT!cWH = cboTransfer
'    End If
'End Sub

'Private Sub cboTransfer_KeyDown(KeyCode As Integer, Shift As Integer)
'    If KeyCode = 13 Then
'        If dtgName = dtgTransferIN.Name Then
'            rsIN!cWH = cboTransfer
'            cboTransfer.Visible = False
'            dtgTransferIN.Col = 4
'            dtgTransferIN.SetFocus
'        ElseIf dtgName = dtgTransferOUT.Name Then
'            rsOUT!cWH = cboTransfer
'            cboTransfer.Visible = False
'            dtgTransferOUT.Col = 4
'            dtgTransferOUT.SetFocus
'        End If
'    ElseIf KeyCode = vbKeyEscape Then
'        cboTransfer.Visible = False
'    End If
'End Sub
'
'Private Sub cboTransfer_LostFocus()
'    cboTransfer.Visible = False
'End Sub
'
'Private Sub dtgTransferIN_AfterColUpdate(ByVal ColIndex As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    Select Case ColIndex
'        Case 0
'            If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgTransferIN.Columns(0).Value) & "'") <> "" Then
'                GetInitialItemValues rsIN
'                dtgTransferIN.Columns(3).Value = rsIN!cWH
'                dtgTransferIN.Col = 3
'            End If
'    End Select
'
'End Sub
'
'Private Sub dtgTransferIN_ButtonClick(ByVal ColIndex As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    Select Case ColIndex
'        Case 0
'            If lPickListActive Then Exit Sub
'            sFilterString = Trim(dtgTransferIN.Columns(0).Text)
'            frmITGPickList.mType = Product
'            frmITGPickList.Show vbModal
'            rsIN!cItemNo = Trim(frmITGPickList.mCode) & ""
'            If (Trim(frmITGPickList.mName) & "") <> "" Then
'                GetInitialItemValues rsIN
'                dtgTransferIN.Columns(3).Value = rsIN!cWH
'                dtgTransferIN.Col = 3
'            End If
'        Case 3
'            Call LoadComboValues(cboTransfer, "cWH", "WHSE", "WHERE cCompanyID = '" & COID & "'")
'            Call MoveCombo(cboTransfer, dtgTransferIN, dtgTransferIN.Columns(3))
'            ComboLoadValue cboTransfer, Trim(dtgTransferIN.Columns(3).Text)
'    End Select
'
'End Sub
'
''Set the datagrid as active control
'Private Sub dtgTransferIN_Click()
'    If Mode = AddNewEdit Then dtgName = dtgTransferIN.Name
'End Sub
'
'Private Sub dtgTransferIN_Error(ByVal DataError As Integer, Response As Integer)
'    Response = 0
'End Sub
'
'Private Sub dtgTransferIN_GotFocus()
'    dtgName = dtgTransferIN.Name
'End Sub
'
'Private Sub dtgTransferIN_KeyDown(KeyCode As Integer, Shift As Integer)
'    If Mode <> AddNewEdit Then Exit Sub
'    If (Shift = vbCtrlMask And KeyCode = 45) Then
'        TBNewLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
'        TBDeleteLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
'        TBSave
'    End If
'End Sub
'
'Private Sub dtgTransferIN_KeyPress(KeyAscii As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    If rsIN.RecordCount = 0 Then Exit Sub
'
'    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
'
'    If KeyAscii = 13 Then
'        Select Case dtgTransferIN.Col
'            Case 0
'                If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgTransferIN.Columns(0).Value) & "'") = "" Then
'                    dtgTransferIN_ButtonClick (0) 'use button click
'                    dtgTransferIN.Columns(3).Value = rsIN!cWH
'                    dtgTransferIN.Col = 3
'                End If
'            Case 3
'                If cboTransfer.Visible = False Then
'                    dtgTransferIN_ButtonClick (3)
'                    If Trim(dtgTransferIN.Columns(3).Text) <> "" Then cboTransfer = Trim(dtgTransferIN.Columns(3).Text)
'                Else
'                    SendKeys "{Tab}"
'                End If
'            Case 4
'                If dtgTransferIN.Columns(4).Value <> "" Then
'                    TBNewLine
'                    dtgTransferIN.LeftCol = 0
'                Else
'                    dtgTransferIN.Col = 4
'                End If
'            Case Else
'                SendKeys "{Tab}"
'        End Select
'    Else
'        KeyAscii = Asc(UCase(Chr(KeyAscii))) 'All Upper Case String
'    End If
'
'End Sub
'
''Right click menu popup
'Private Sub dtgTransferIN_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'    If Mode <> AddNewEdit Then Exit Sub
'    If Button = 2 Then
'        dtgName = dtgTransferIN.Name
'        PopupMenu ITGLedgerMain.mnuDetail
'    End If
'End Sub
'
'Private Sub dtgTransferOUT_AfterColUpdate(ByVal ColIndex As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    Select Case ColIndex
'        Case 0
'            If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgTransferOUT.Columns(0).Value) & "'") <> "" Then
'                GetInitialItemValues rsOUT
'                dtgTransferOUT.Columns(3).Value = rsOUT!cWH
'                dtgTransferOUT.Col = 3
'            End If
'    End Select
'
'End Sub
'
'Private Sub dtgTransferOUT_ButtonClick(ByVal ColIndex As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    Select Case ColIndex
'        Case 0
'            If lPickListActive Then Exit Sub
'            sFilterString = Trim(dtgTransferOUT.Columns(0).Text)
'            frmITGPickList.mType = Product
'            frmITGPickList.Show vbModal
'            rsOUT!cItemNo = Trim(frmITGPickList.mCode) & ""
'            If (Trim(frmITGPickList.mName) & "") <> "" Then
'                GetInitialItemValues rsOUT
'                dtgTransferOUT.Columns(3).Value = rsOUT!cWH
'                dtgTransferOUT.Col = 3
'            End If
'        Case 3
'            Call LoadComboValues(cboTransfer, "cWH", "WHSE", "WHERE cCompanyID = '" & COID & "'")
'            Call MoveCombo(cboTransfer, dtgTransferOUT, dtgTransferOUT.Columns(3))
'            ComboLoadValue cboTransfer, Trim(dtgTransferOUT.Columns(3).Text)
'    End Select
'
'End Sub
'
''Set the datagrid as active control
'Private Sub dtgTransferOUT_Click()
'    If Mode = AddNewEdit Then dtgName = dtgTransferOUT.Name
'End Sub
'
'Private Sub dtgTransferOUT_Error(ByVal DataError As Integer, Response As Integer)
'    Response = 0
'End Sub
'
'Private Sub dtgTransferOUT_GotFocus()
'    dtgName = dtgTransferOUT.Name
'End Sub
'
'Private Sub dtgTransferOUT_KeyDown(KeyCode As Integer, Shift As Integer)
'    If Mode <> AddNewEdit Then Exit Sub
'    If (Shift = vbCtrlMask And KeyCode = 45) Then
'        TBNewLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 46) Then
'        TBDeleteLine
'    ElseIf (Shift = vbCtrlMask And KeyCode = 83) Then
'        TBSave
'    End If
'End Sub
'
'Private Sub dtgTransferOUT_KeyPress(KeyAscii As Integer)
'
'    If Mode <> AddNewEdit Then Exit Sub
'    If rsOUT.RecordCount = 0 Then Exit Sub
'
'    If KeyAscii = 39 Then KeyAscii = 0 'Apostrophe {'}
'
'    If KeyAscii = 13 Then
'        Select Case dtgTransferOUT.Col
'            Case 0
'                If GetValueFrTable("cItemNo", "ITEM", "cItemNo = '" & Trim(dtgTransferOUT.Columns(0).Value) & "'") = "" Then
'                    dtgTransferOUT_ButtonClick (0) 'use button click
'                    dtgTransferOUT.Columns(3).Value = rsOUT!cWH
'                    dtgTransferOUT.Col = 3
'                End If
'            Case 3
'                If cboTransfer.Visible = False Then
'                    dtgTransferOUT_ButtonClick (3)
'                    If Trim(dtgTransferOUT.Columns(3).Text) <> "" Then cboTransfer = Trim(dtgTransferOUT.Columns(3).Text)
'                Else
'                    SendKeys "{Tab}"
'                End If
'            Case 4
'                If dtgTransferOUT.Columns(4).Value <> "" Then
'                    TBNewLine
'                    dtgTransferOUT.LeftCol = 0
'                Else
'                    dtgTransferOUT.Col = 4
'                End If
'            Case Else
'                SendKeys "{Tab}"
'        End Select
'    Else
'        KeyAscii = Asc(UCase(Chr(KeyAscii))) 'All Upper Case String
'    End If
'
'End Sub
'
''Right click menu popup
'Private Sub dtgTransferOUT_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'    If Mode <> AddNewEdit Then Exit Sub
'    If Button = 2 Then
'        dtgName = dtgTransferOUT.Name
'        PopupMenu ITGLedgerMain.mnuDetail
'    End If
'End Sub

Private Sub dtgList_HeadClick(ByVal ColIndex As Integer)
    SortGrid dtgList, ColIndex, rsHeader
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
Dim iKey As Integer
    iKey = ToolbarIndex(KeyCode, Shift)
    If iKey <> 0 Then
        If ITGLedgerMain.tbrMain.Buttons(iKey).Enabled = True Then
            ToolbarFunction iKey
        End If
    End If
End Sub

'Set Your Object
Private Sub Form_Load()
    Set FrmName = Me
    FormSetup
    
    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'MI07'")

    Set rsHeader = New ADODB.Recordset
    Set rsIN = New ADODB.Recordset
    Set rsOUT = New ADODB.Recordset

    

    Set FrmName = Me
    FormLocking True
    FormSearch True
    SearchObj True
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
    BitVisible ITGLedgerMain.tbrMain, True, True
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True

    Mode = Find
    txtTranNo.Locked = False
       
  

End Sub

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
    If Mode = AddNewEdit Then
        MsgBox "Unable to close. You are in Add/New/Edit mode." & vbCr & _
            " Must Save or Undo", vbCritical, Me.Caption
        Cancel = True
        Exit Sub
    End If
    
    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False

    
    
    
    
    Set oPrint = Nothing
    Set rsHeader = Nothing
    Set rsIN = Nothing
    Set rsOUT = Nothing
    Set connHeader = Nothing
    Set connIN = Nothing
    Set connOUT = Nothing

    Set frmFATransfer = Nothing

    lCloseWindow = True
    
'    'oForm(Me.Tag).Mode = 1
'    'oForm(Me.Tag).Tag = Me.Tag
End Sub

'Add new record to the recordset
Public Sub TBNew()

'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'    txtTranNo.BackColor = &HE0FFFF
'    Mode = AddNewEdit
'
'    If rsHeader.State <> adStateOpen Then
'        OpenNewConnection connHeader
'        OpenNewConnection connIN
'        OpenNewConnection connOUT
'        OpenRecordsetWithCN rsIN, "*", "TRANSFER_IN", connIN, "WHERE 1 = 0"
'        OpenRecordsetWithCN rsOUT, "*", "TRANSFER_OUT", connOUT, "WHERE 1 = 0"
'        OpenRecordsetWithCN rsHeader, "*", "TRANSFER", connHeader, "WHERE 1 = 0"
'        SetDataSource
'        SetDataField
'    Else
'        vBM = rsHeader.Bookmark
'    End If
'
'    rsHeader.AddNew
'    rsHeader!cCompanyID = COID
'    rsHeader!dDate = Date
'
'    Set FrmName = Me
'    FormLocking False
'    ClrRequired &HC0&
'    SSTab1.Tab = 0
'    txtTranNo.SetFocus
'
'    'System generated number
'    lSystemGenerated = GetValueFrTable("lBit", "SYSTEM_OPTION", "cCode = 'AUTO_NUMBER_INVTRNS' ")
'    If lSystemGenerated Then rsHeader!cTranNo = GetAutoCtrlNo(rsHeader, "AUTO_NUMBER_INVTRNS", "TRANSFER", "cTranNo")
'
End Sub

'Undo all changes to the recordset
Public Sub TBUndoAll()
On Error GoTo ErrorHandler

    Mode = Normal

    If rsHeader.Status = adRecNew Then TBUndoCurrent

    rsHeader.CancelBatch adAffectAll
    rsIN.CancelBatch adAffectAll
    rsOUT.CancelBatch adAffectAll

    UnbindControls

    If rsHeader.RecordCount <> 0 Then rsHeader.Bookmark = vBM

    Set FrmName = Me
    FormLocking True

    If rsHeader.RecordCount <> 0 Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , lACCancel, , , True, True, lACPrint, True
    Else
        RSZero
        Mode = Find
    End If

    sbRS.Panels(2) = ""

    SetDataSource
    SetDataField

ErrorHandler:
    'cboTransfer.Visible = False
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoAll
    End If

End Sub

'Undo changes on the current record
Public Sub TBUndoCurrent()
On Error GoTo ErrorHandler

    GetChild
    If rsHeader.Status = adRecNew Then
        rsIN.CancelBatch adAffectAll
        rsOUT.CancelBatch adAffectAll
        rsHeader.CancelUpdate
    Else
        rsHeader.CancelBatch adAffectCurrent
        rsIN.CancelBatch adAffectAll
        rsOUT.CancelBatch adAffectAll
    End If

    If rsHeader.RecordCount = 0 Then RSZero

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    ElseIf err.Number = -2147217842 Then 'Operation was cancelled. (Error returned by ITGDateBox)
        TBUndoCurrent
    End If
End Sub

'Save all changes
Public Sub TBSave()
Dim OKUpdate As Boolean
Dim iINAmount As Integer, iOUTAmount As Integer
On Error GoTo ErrHandler
'
'    TBNewLine
'
'    'Audit Trail
'    lBoolean = False
'    If rsHeader.Status = adRecNew Then lBoolean = True
'
'    Set rs = rsIN.Clone
'    rs.Filter = "cTranNo = '" & Trim(rsHeader!cTranNo) & "' "
'    rs.MoveFirst
'    Do Until rs.EOF
'        iINAmount = iINAmount + IIf(IsNull(rs!nQty), 0, rs!nQty)
'        rs.MoveNext
'    Loop
'
'    Set rs = rsOUT.Clone
'    rs.Filter = "cTranNo = '" & Trim(rsHeader!cTranNo) & "' "
'    rs.MoveFirst
'    Do Until rs.EOF
'        iOUTAmount = iOUTAmount + IIf(IsNull(rs!nQty), 0, rs!nQty)
'        rs.MoveNext
'    Loop
'
'    If iOUTAmount <> iINAmount Then
'        MsgBox "Transfer quantity not balance.", vbCritical + vbOKOnly, "ALERT"
'        dtgTransferOUT.Columns(4) = 0
'        Exit Sub
'    End If
'
'    If Not MandatoryOK Then Exit Sub
'
'    'System generated number
'    If rsHeader.Status = adRecNew Then
'        If lSystemGenerated Then
'            If ChkCtrlNo(rsHeader, "AUTO_NUMBER_INVTRNS", "TRANSFER", "cTranNo", rsHeader!cTranNo) <> rsHeader!cTranNo Then
'                GetChild
'
'                rsHeader!cTranNo = strNo
'
'                If rsIN.RecordCount <> 0 Then rsIN.MoveFirst
'                Do Until rsIN.EOF
'                    rsIN!cTranNo = strNo
'                    rsIN.MoveNext
'                Loop
'
'                If rsOUT.RecordCount <> 0 Then rsOUT.MoveFirst
'                Do Until rsOUT.EOF
'                    rsOUT!cTranNo = strNo
'                    rsOUT.MoveNext
'                Loop
'
'                GetChild
'            End If
'        End If
'    End If
'
'    OKUpdate = False
'    cn.BeginTrans
'    connHeader.BeginTrans
'    connIN.BeginTrans
'    connOUT.BeginTrans
'
'    rsHeader.UpdateBatch adAffectAll
'    rsIN.UpdateBatch adAffectAll
'    rsOUT.UpdateBatch adAffectAll
'
'    cn.CommitTrans
'    connHeader.CommitTrans
'    connIN.CommitTrans
'    connOUT.CommitTrans
'    OKUpdate = True
'
'    Set FrmName = Me
'    FormLocking True
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , lACCancel, , , True, True, lACPrint, True
'    Mode = Normal
'
'    'Audit trail
'    UpdateLogFile "Inventory Transfer", Trim(txtTranNo), IIf(lBoolean, "Inserted", "Updated")
'
'    'update system generated number
'    If lBoolean Then
'        If lSystemGenerated And strNo = rsHeader!cTranNo Then UpdateControlNo strNo, rsHeader!cTranNo, "AUTO_NUMBER_INVTRNS"
'    End If
'
'    MsgBox "Record/s successfully saved.", vbInformation, "ComUnion"
'    sbRS.Panels(2) = ""
'
'
'
ErrHandler:
'    cboTransfer.Visible = False
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = 3021 Then
'        MsgBox "Update failed. Transaction has been changed.", vbInformation, "ComUnion"
'        TBUndoAll
'        Exit Sub
'
'    ElseIf Err.Number = -2147217864 Then
'        OKUpdate = True
'        cn.RollbackTrans
'        connHeader.RollbackTrans
'        connIN.RollbackTrans
'        connOUT.RollbackTrans
'        MsgBox "Record cannot be updated. Some values may have been changed by other user/s since last read." & vbCr & _
'                "Records will be automatically refreshed. All changes made to the record will be gone upon refresh.", vbInformation, "ComUnion"
'        vBookMark = rsHeader.Bookmark
'        UnbindControls
'        rsHeader.Requery
'        rsIN.Requery
'        rsOUT.Requery
'        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , lACCancel, , , True, True, lACPrint, True
'        Mode = Normal
'        If rsHeader.RecordCount <> 0 Then
'            Set FrmName = Me
'            FormLocking True
'            SetDataField
'            SetDataSource
'            rsHeader.Bookmark = vBookMark
'        Else
'            RSZero
'        End If
'    End If
'    If Not OKUpdate Then
'        MsgBox "Transaction update failed.", vbInformation, "ComUnion"
'        cn.RollbackTrans
'        connHeader.RollbackTrans
'        connIN.RollbackTrans
'        connOUT.RollbackTrans
'        ErrorLog Err.Number, Err.Description, Me.Name 'Error log
'    End If
'
End Sub

'Sets the form & recorset to add/edit mode
Public Sub TBEdit()
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled. Edit is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'    Mode = AddNewEdit
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'    Set FrmName = Me
'    FormLocking False
'    ClrRequired &HC0&
'    txtTranNo.Locked = True
'    SSTab1.Tab = 0
'    dtbDate.SetFocus
'    vBM = rsHeader.Bookmark
End Sub

'Delete record
Public Sub TBDelete()
On Error GoTo ErrorHandler

'    sID = Trim(txtTranNo)
'
'    If rsHeader.RecordCount = 0 Then Exit Sub
'
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled. Deletion is not allowed.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
'
'    GetChild
'    If rsIN.RecordCount <> 0 Then
'        rsIN.MoveFirst
'        Do Until rsIN.RecordCount = 0
'            rsIN.Delete adAffectCurrent
'            If rsIN.RecordCount <> 0 Then rsIN.MoveFirst
'        Loop
'    End If
'    If rsOUT.RecordCount <> 0 Then
'        rsOUT.MoveFirst
'        Do Until rsOUT.RecordCount = 0
'            rsOUT.Delete adAffectCurrent
'            If rsOUT.RecordCount <> 0 Then rsOUT.MoveFirst
'        Loop
'    End If
'
'    'Audit trail
'    UpdateLogFile "Inventory Transfer", Trim(txtTranNo), "Deleted"
'
'    rsHeader.Delete adAffectCurrent
'
'    rsIN.UpdateBatch adAffectAll
'    rsOUT.UpdateBatch adAffectAll
'    rsHeader.UpdateBatch adAffectAll
'
'    TBPrevRec
'
'    Mode = Normal
'
'    If rsHeader.RecordCount = 0 Then
'        RSZero
'    End If
'
ErrorHandler:
'    If Err.Number = -2147217885 Then
'        Resume Next
'    ElseIf Err.Number = -2147217864 Then
'        cn.Execute "DELETE TRANSFER_OUT WHERE cTranNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        cn.Execute "DELETE TRANSFER_IN WHERE cTranNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        cn.Execute "DELETE TRANSFER WHERE cTranNo = '" & sID & "' AND cCompanyID = '" & COID & "'"
'        Resume Next
'    End If
End Sub

'Search using the frmITGSearch
Public Sub TBFind()
    Mode = Normal
    txtTranNo.Locked = True
    frmITGSearch.Show 'vbModal
End Sub

'Search using the recordset primary key
Public Sub TBFindPrimary()
Dim sTemp As String
If Mode = Find Then
'    FormWaitShow App.Path & "\Transmit.avi", "Loading data . . ."
'
'    OpenNewConnection connHeader
'    OpenNewConnection connIN
'    OpenNewConnection connOUT
'
'    Set rsHeader = Nothing
'    Set rsIN = Nothing
'    Set rsOUT = Nothing
'    Set rsHeader = New ADODB.Recordset
'    Set rsIN = New ADODB.Recordset
'    Set rsOUT = New ADODB.Recordset
'
'    sTemp = Trim$(GetSearchString)
'    If sTemp = "ERROR" Then
'        MsgBox "Only Allows A - Z, 0 - 9, '.', ',' and %(wildcard)", vbExclamation, ""
'        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
'        txtTranNo.Locked = False
'        txtTranNo.SetFocus
'        Exit Sub
'    End If
'
'    OpenRecordsetWithCN rsHeader, "*", "TRANSFER", connHeader, IIf(sTemp = "", "", " WHERE " & sTemp)
'    OpenRecordsetWithCN rsIN, "*", "TRANSFER_IN", connIN
'    OpenRecordsetWithCN rsOUT, "*", "TRANSFER_OUT", connOUT
'
'    Set FrmName = Me
'    FormLocking True
'
'    If rsHeader.RecordCount = 0 Then
'        FormWaitHide
'        MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
'        RSZero
'        FormSearch True
'        SearchObj True
'        Mode = Find
'        Exit Sub
'    End If
'    SetDataSource
'    SetDataField
'    txtTranNo.BackColor = &HE0FFFF
'    Mode = Normal
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , lACCancel, , , True, True, lACPrint, True
'
'    FormWaitHide
Else
'    RSZero
'    FormSearch True
'    SearchObj True
'    Mode = Find
End If
End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain, True, True
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = True
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
'    dtgName = dtgTransferIN.Name
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

'Move first
Public Sub TBFirstRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveFirst rsHeader
End Sub

'Move previuos
Public Sub TBPrevRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MovePrevious rsHeader
End Sub

'Move next
Public Sub TBNextRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveNext rsHeader
End Sub

'Move last
Public Sub TBLastRec()
    If rsHeader.State <> adStateOpen Then Exit Sub
    MoveLast rsHeader
End Sub

'Add new line to the detail recordset
Public Sub TBNewLine()
'
'    If rsHeader!cTranNo = "" Then Exit Sub
'
'    If dtgName = "dtgTransferIN" Then
'        rsIN.AddNew
'        rsIN!cCompanyID = COID
'        rsIN!cTranNo = Trim(rsHeader!cTranNo)
'        dtgTransferIN.Col = 0
'        dtgTransferIN.Columns(0).Value = ""
'        GetChild
'        If rsIN.RecordCount <> 0 Then rsIN.MoveLast
'        dtgTransferIN.SetFocus
'    ElseIf dtgName = "dtgTransferOUT" Then
'        rsOUT.AddNew
'        rsOUT!cCompanyID = COID
'        rsOUT!cTranNo = Trim(rsHeader!cTranNo)
'        dtgTransferOUT.Col = 0
'        dtgTransferOUT.Columns(0).Value = ""
'        GetChild
'        If rsOUT.RecordCount <> 0 Then rsOUT.MoveLast
'        dtgTransferOUT.SetFocus
'    End If
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True
'
End Sub

'Delete line in the detail recordset
Public Sub TBDeleteLine()
On Error GoTo ErrorHandler

'    If dtgName = dtgTransferIN.Name Then
'        If rsIN.RecordCount = 0 Then Exit Sub
'        vBookMark = dtgTransferIN.Bookmark
'        GetChild
'        dtgTransferIN.Bookmark = vBookMark
'        rsIN.Delete adAffectCurrent
'    ElseIf dtgName = dtgTransferOUT.Name Then
'        If rsOUT.RecordCount = 0 Then Exit Sub
'        vBookMark = dtgTransferOUT.Bookmark
'        GetChild
'        dtgTransferOUT.Bookmark = vBookMark
'        rsOUT.Delete adAffectCurrent
'    End If
'    GetChild
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , True, True, , , True, True, , , , True

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

'Undo All
Public Sub TBUndoLineAll()
On Error GoTo ErrorHandler

    MsgBox "Unavailable on " & Me.Name

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

'Undo current line
Public Sub TBUndoLineCurrent()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Post current record
Public Sub TBPostRecord()
    MsgBox "Unavailable on " & Me.Name
End Sub

'Cancel current record
Public Sub TBCancelRecord()
On Error GoTo ErrorHandler

'    If rsHeader.RecordCount = 0 Then Exit Sub
'
'    If rsHeader!lCancelled = True Then
'        MsgBox "Transaction was already cancelled.", vbExclamation, "ComUnion"
'        Exit Sub
'    End If
'
'    If MsgBox("Are you sure you want to cancel this record?", vbQuestion + vbYesNo, "ComUnion") = vbNo Then Exit Sub
'
'    'Audit trail
'    UpdateLogFile "Inventory Transfer", Trim(txtTranNo), "Cancelled"
'
'    cn.Execute ("UPDATE TRANSFER SET lCancelled = 1 WHERE cTranNo = '" & Trim(txtTranNo) & "' AND cCompanyID = '" & COID & "'")
'
'    sbRS.Panels(5) = "CANCELLED"
'    Mode = Normal
'
'    rsHeader!lCancelled = True
'    rsHeader.UpdateBatch adAffectAll

ErrorHandler:
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

'Print
Public Sub TBPrintRecord()
'    cModule = "Inventory_Transfer"
'    oPrint.PrintReceipt Trim(txtTranNo)
End Sub

'Sets the data source of the controls
Sub SetDataSource()
    Set FrmName = Me
    BindControls rsHeader
'    Set dtgList.DataSource = rsHeader
'    Set dtgTransferIN.DataSource = rsIN
'    Set dtgTransferOUT.DataSource = rsOUT
End Sub

'Sets the data field for every bounded controls
Sub SetDataField()
    With rsHeader
'        txtTranNo.DataField = !cTranNo
'        dtbDate.DataField = !dDate
'        txtRemarks.DataField = !cRemarks
    End With
End Sub

Private Sub rsHeader_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
On Error GoTo ErrorHandler

'    If Not (rsHeader.EOF) Or Not (rsHeader.BOF) Then
'        'Status bar setup
'        sbRS.Panels(1) = "Record: " & IIf((rsHeader.AbsolutePosition = -2), "0", rsHeader.AbsolutePosition) & "/" & rsHeader.RecordCount
'
'        If rsHeader.Status <> adRecNew Then
'            txtTranNo.Locked = True
'        Else
'            txtTranNo.Locked = False
'        End If
'
'        If Mode = AddNewEdit Then
'            Select Case rsHeader.Status
'                Case adRecNew
'                    sbRS.Panels(2) = "New"
'                Case adRecModified
'                    sbRS.Panels(2) = "Modified"
'                Case Else
'                    sbRS.Panels(2) = ""
'            End Select
'        Else
'            sbRS.Panels(2) = ""
'        End If
'
'        GetChild
'
'        If rsHeader!lCancelled = True Then
'            sbRS.Panels(5) = "CANCELLED"
'        Else
'            sbRS.Panels(5) = ""
'        End If
'    Else
'        sbRS.Panels(1) = "Record: 0/0"
'        sbRS.Panels(2) = ""
'        txtTranNo.Locked = False
'    End If
'
'    If Mode = AddNewEdit Then
'        dtgTransferIN.Refresh
'        dtgTransferOUT.Refresh
'    End If

ErrorHandler:
    'Err.Number -2147217885
    'Description - Row handle referred to a deleted row or a row marked for deletion.
    If err.Number = -2147217885 Then
        Resume Next
    End If
End Sub

Private Sub Timer1_Timer()
    If Mode = AddNewEdit Then
        SSTab1.TabEnabled(1) = False
    Else
        SSTab1.TabEnabled(1) = True
    End If
End Sub

'Private Sub txtRemarks_LostFocus()
'    If Mode <> AddNewEdit Then Exit Sub
'    If rsIN.RecordCount = 0 Then TBNewLine
'End Sub
'
'Private Sub txtTranNo_LostFocus()
'    'Does Code Already Exist
'    If Mode = AddNewEdit Then
'        If Trim(txtTranNo) = "" Then
'            MsgBox "Empty primary input.", vbInformation, "ComUnion"
'            txtTranNo.SetFocus
'        Else
'            If rsHeader.Status <> adRecNew Then Exit Sub
'            txtTranNo = Trim(txtTranNo)
'            If IDExisting(rsHeader, "cTranNo", "TRANSFER", Trim(rsHeader!cTranNo)) Then
'                MsgBox "Trancsaction No. already exist.", vbInformation, "ComUnion"
'                txtTranNo.SetFocus
'            End If
'        End If
'    End If
'End Sub

'Check if all mandatory fields are complete
Function MandatoryOK() As Boolean

    MandatoryOK = True

'    If Trim(txtTranNo) = "" Then
'        MandatoryOK = False
'        MsgBox "Field 'Transaction Number' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        txtTranNo.SetFocus
'        Exit Function
'    End If
'
'    If rsHeader.Status = adRecNew And lSystemGenerated = False Then
'        If IDExisting(rsHeader, "cTranNo", "TRANSFER", Trim(rsHeader!cTranNo)) Then
'            MandatoryOK = False
'            MsgBox "Transaction No. already exist.", vbInformation, "ComUnion"
'            txtTranNo.SetFocus
'            Exit Function
'        End If
'    End If
'
'    'Required fields
'    If Trim(dtbDate.Text) = "__/__/____" Then
'        MandatoryOK = False
'        MsgBox "Field 'Transaction Date' is mandatory. Null value is not allowed.", vbInformation, "ComUnion"
'        dtbDate.SetFocus
'        Exit Function
'    End If
'
'    GetChild
'
'    'Transaction without details
'    If rsIN.RecordCount = 0 Then
'        MandatoryOK = False
'        MsgBox "Cannot save transaction without details.", vbInformation, "ComUnion"
'        dtgTransferIN.SetFocus
'        Exit Function
'    End If
'    If rsOUT.RecordCount = 0 Then
'        MandatoryOK = False
'        MsgBox "Cannot save transaction without details.", vbInformation, "ComUnion"
'        dtgTransferOUT.SetFocus
'        Exit Function
'    End If
'
'    If rsIN.RecordCount <> 0 Then rsIN.MoveFirst
'    Do Until rsIN.EOF
'        If rsIN.Status = (adRecNew) Or rsIN.Status = (adRecModified) Then
'            If IsNull(rsIN!cItemNo) Then
'                rsIN.Delete
'            ElseIf Trim(rsIN!cItemNo) = "" Then
'                rsIN.Delete
'            ElseIf IsNull(rsIN!cWH) Then
'                rsIN.Delete
'            ElseIf Trim(rsIN!cWH) = "" Then
'                rsIN.Delete
'            Else
'                rsIN.MoveNext
'            End If
'        Else
'            rsIN.MoveNext
'        End If
'    Loop
'
'    If rsOUT.RecordCount <> 0 Then rsOUT.MoveFirst
'    Do Until rsOUT.EOF
'        If rsOUT.Status = (adRecNew) Or rsOUT.Status = (adRecModified) Then
'            If IsNull(rsOUT!cItemNo) Then
'                rsOUT.Delete
'            ElseIf Trim(rsOUT!cItemNo) = "" Then
'                rsOUT.Delete
'            ElseIf IsNull(rsOUT!cWH) Then
'                rsOUT.Delete
'            ElseIf Trim(rsOUT!cWH) = "" Then
'                rsOUT.Delete
'            Else
'                rsOUT.MoveNext
'            End If
'        Else
'            rsOUT.MoveNext
'        End If
'    Loop
'
'    GetChild
'
'    If rsIN.RecordCount = 0 Then
'        MandatoryOK = False
'        MsgBox "Cannot save transaction without details.", vbInformation, "ComUnion"
'        dtgTransferIN.SetFocus
'        Exit Function
'    End If
'    If rsOUT.RecordCount = 0 Then
'        MandatoryOK = False
'        MsgBox "Cannot save transaction without details.", vbInformation, "ComUnion"
'        dtgTransferOUT.SetFocus
'        Exit Function
'    End If
'
End Function

'Filter detail recordset to header's primary
Private Sub GetChild()
'    rsIN.Filter = "cTranNo = '" & Trim(rsHeader!cTranNo) & "'"
'    rsOUT.Filter = "cTranNo = '" & Trim(rsHeader!cTranNo) & "'"
End Sub

'Sets the form if record number is zero
Private Sub RSZero()
    sbRS.Panels(1) = "Record: 0/0"
    sbRS.Panels(2) = ""
    sbRS.Panels(4) = ""
    sbRS.Panels(5) = ""

'    Set dtgTransferIN.DataSource = Nothing
'    Set dtgTransferOUT.DataSource = Nothing
'    dtgTransferIN.Refresh
'    dtgTransferOUT.Refresh
'
'    Set FrmName = Me
'    UnbindControls
'    TextClearing
'    FormLocking True
'
'    If rsHeader.State = adStateOpen Then rsHeader.Close
'    If rsIN.State = adStateOpen Then rsIN.Close
'    If rsOUT.State = adStateOpen Then rsOUT.Close
'
'    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, , , , , , , , , True, , , True
'
'    txtTranNo.Locked = False
'    txtTranNo.SetFocus

    Mode = Find

End Sub

Sub SearchObj(lEnable As Boolean)
    dtbDate.Enabled = lEnable
End Sub

'Gets initital item values
Private Sub GetInitialItemValues(RefRS As Recordset)
'    RefRS!cDesc = Trim(GetValueFrTable("cDesc", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'    RefRS!cUnit = Trim(GetValueFrTable("cUnit", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'")) & ""
'    RefRS!nCost = IIf(GetValueFrTable("nAveCost", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'") = "", 0, GetValueFrTable("nAveCost", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "'"))
'    RefRS!cWH = Trim(GetValueFrTable("cWH", "ITEM", "cItemNo = '" & Trim(RefRS!cItemNo) & "' ")) & ""
End Sub

Private Function GetSearchString() As String
On Error GoTo ErrorHandler
Dim sWhere As String
'
'    GetSearchString = True
'
'    If Trim$(txtTranNo.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cTranno LIKE '" & Trim$(txtTranNo.Text) & "%'"
'    End If
'
'    If Trim$(dtbDate.Text) <> "__/__/____" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " dDate = '" & Trim$(dtbDate.Text) & "'"
'    End If
'
'    If Trim$(txtRemarks.Text) <> "" Then
'        sWhere = sWhere & IIf(Trim$(sWhere) = "", "", " AND ") & " cRemarks LIKE '" & Trim$(txtRemarks.Text) & "%'"
'    End If
'
'    GetSearchString = Trim$(sWhere)
'
    Exit Function
ErrorHandler:
    GetSearchString = "ERROR"
End Function

'Public Sub ShowForm(sTranNo As String)
''    If Mode = Find Then
''
''        OpenNewConnection connHeader
''        OpenNewConnection connIN
''        OpenNewConnection connOUT
''
''        Set rsHeader = Nothing
''        Set rsIN = Nothing
''        Set rsOUT = Nothing
''        Set rsHeader = New ADODB.Recordset
''        Set rsIN = New ADODB.Recordset
''        Set rsOUT = New ADODB.Recordset
''
''        OpenRecordsetWithCN rsIN, "*", "TRANSFER_IN", connIN, "WHERE cTranNo = '" & Trim(sTranNo) & "'"
''        OpenRecordsetWithCN rsOUT, "*", "TRANSFER_OUT", connOUT, "WHERE cTranNo = '" & Trim(sTranNo) & "'"
''        OpenRecordsetWithCN rsHeader, "*", "TRANSFER", connHeader, "WHERE cTranNo = '" & Trim(sTranNo) & "'"
''
''        Set FrmName = Me
''        FormLocking True
''
''        If rsHeader.RecordCount = 0 Then
''            FormWaitHide
''            MsgBox "No matching record/s found.", vbInformation, "ComUnion Search"
''            RSZero
''            FormSearch True
''            SearchObj True
''            Mode = Find
''            Exit Sub
''        End If
''            SetDataSource
''            SetDataField
''            txtTranNo.BackColor = &HE0FFFF
''            Mode = Normal
''            oBar.BitEnabled Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , lACCancel, , , True, True, lACPrint, True
''
''    End If
'End Sub

Private Sub txtEmpName_LabelClick()

End Sub
